configure.ac: Fix checks for libarchive
authorAdrian Perez <aperez@igalia.com>
Tue, 28 Aug 2012 13:36:07 +0000 (16:36 +0300)
committerAdrian Perez <aperez@igalia.com>
Tue, 28 Aug 2012 13:36:07 +0000 (16:36 +0300)
When configuring without passing --enable-triggers-only, checks for
libarchive were not being done. Shuffling around the checks solves
the issue.

configure.ac

index d6a9f99b3d2712f9467ac6bb2c30e25821cbd06d..1aa747b0fe42ecc3ac0170365c4ead08dbcefabb 100644 (file)
@@ -91,7 +91,11 @@ AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes)
 AC_ARG_WITH(libarchive,
            AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
            :, with_libarchive=maybe)
-AS_IF([ test x$with_libarchive != xno && test x$enable_triggers_only != xno ], [
+if test x$enable_triggers_only != xno; then
+       with_libarchive=no
+fi
+
+AS_IF([ test x$with_libarchive != xno ], [
     AC_MSG_CHECKING([for $LIBARCHIVE_DEPENDENCY])
     PKG_CHECK_EXISTS($LIBARCHIVE_DEPENDENCY, have_libarchive=yes, have_libarchive=no)
     AC_MSG_RESULT([$have_libarchive])